package datamining;

public class ItemSet
{
    private int count = 0;
    private String[] elements = null;

    public ItemSet(String element)
    {
        count = 0;
        this.elements = new String[1];
        this.elements[0] = element;
    }

    public ItemSet(String[] elements)
    {
        count = 0;
        this.elements = elements;
    }

    public void addOneCount()
    {
        count++;
    }

    public int getCount()
    {
        return count;
    }

    public String[] getElements()
    {
        return elements;
    }

    @Override public String toString() {
        String tmp = "[";
        for (int i = 0; i < elements.length; ++i)
        {
            tmp = tmp + " " + elements[i];
        }
        tmp = tmp + " ]";
        return tmp;
    }
}
